#include <QCoreApplication>
#include "Class/cgraph.h"
#include <iostream>


int main(int argc, char *argv[])
{
    QCoreApplication a(argc, argv);

    CGraph *pGraph = new CGraph(10);

    for(int i = 0; i < 10; ++i)
    {
        pGraph->addVertex (i);
    }

    pGraph->connectVertex (0, 1, 10); // 5
    pGraph->connectVertex (1, 5, 5); // 3
    pGraph->connectVertex (5, 2, 13);
    pGraph->connectVertex (2, 3, 2); // 2
    pGraph->connectVertex (3, 7, 8); // 4
    pGraph->connectVertex (7, 4, 18);
    pGraph->connectVertex (4, 8, 82);
    pGraph->connectVertex (8, 9, 1); // 1
    pGraph->connectVertex (9, 6, 11);


//    pGraph->printEdgeInfo ();
//    pGraph->printMatrix ();
//    pGraph->printVertexInfo ();

//    pGraph->BFS (0);
//    pGraph->printVertexInfo ();
//    pGraph->BFS_ (0);
//    pGraph->LimitPath (3, 0);
//    pGraph->LimitPath_ (3, 0);

//    pGraph->DFS ();

//    cout << pGraph->Prim () <<endl;
//    cout << pGraph->Kruskal() << endl;

    pGraph->Dijkstra ();
//    pGraph->Floyd ();
    return a.exec();
}

